//
//  WCExtractHtml_gui.m
//  WebClipper
//
//  Created by Daniel Braun on 12/04/07.
//  Copyright 2007Daniel Braun http://page-appart.net, http://braun.daniel.free.fr  All rights reserved.
//

#import "WCExtractHtml_gui.h"
#import "WCExtractHtml.h"
#import "WCWebFetchController.h"
#import "WCWebExtractSet.h"
#import "MyDocument.h"

@implementation WCExtractHtml_gui

- (IBAction) provideNextPage:(id) sender
{
	NSLog(@"provide next page\n");
	WCWebFetchController *c=(WCWebFetchController *) controller;
	NSURL *nurl=[NSURL URLWithString:@"webextract://prevhtml"];
	WCWebExtractSet *ne=[[WCWebExtractSet alloc]init];
	[ne setOfficialUrl:nurl];
	MyDocument *cd=[[NSDocumentController sharedDocumentController]currentDocument];
	[cd addExtractionSet:ne];
	[ne release];
	[c setEditingMode:0];
	return;
}

- (void) setKeepNext:(NSNumber *)n
{
	[(WCExtractHtml *)parentObject setKeepNext:n];
	WCWebFetchController *c=(WCWebFetchController *) controller;
	[c curpathUpdated];
}

@end
